//
//  GoodTableViewCell.m
//  GRFMDownloader_Example
//
//  Created by Guo Rui on 2018/1/12.
//  Copyright © 2018年 GR. All rights reserved.
//

#import "GoodTableViewCell.h"

@interface GoodTableViewCell()


@property (nonatomic, strong) UILabel *bookName;
@end

@implementation GoodTableViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.bookName];
    }
    return self;
}
-(void)layoutSubviews{
    
    self.bookName.frame = CGRectMake(10, 10, 0, 0);
    [self.bookName sizeToFit];
    
}

- (void)btnDidClick
{
    [self.p payButtonDidClick];
}

- (void)updateAdImage:(NSString *)adImageUrl
{
    
}

- (void)updateBookName:(NSString *)bookName
{
     self.bookName.text = bookName;
}
- (void)updatePayCount:(NSInteger)payCount
{
    
}

#pragma mark - lazy-load
-(UILabel *)bookName{
    if (!_bookName) {
        _bookName = [[UILabel alloc]init];
        _bookName.textColor = [UIColor blackColor];
    }
    return _bookName;
}

@end
